package pl.edu.agh.nn.kohonen.distance;

public class EuclideanDistance implements Distance {

	@Override
	public double computeDistance(double[] a, double[] b) {
		double ret = 0.0;
		for (int i = 0; i < a.length; ++i) {
			double diff = a[i] - b[i];
			ret += diff * diff;
		}
		return Math.sqrt(ret);
	}

}
